#ifndef QPRINTTOOLS_H
#define QPRINTTOOLS_H

#include <QObject>
#include <QThread>
#include <QDebug>
#include <QMutex>
#include <QMutexLocker>
#include <QDateTime>
#include "qlua.h"

class QPrintTools : public QObject
{
    Q_OBJECT
public:
    explicit QPrintTools(QObject *parent = nullptr);
    ~QPrintTools();

    QMutex mutex;

    QString Product() const;
    void setProduct(const QString &Product);

    QString Working() const;
    void setWorking(const QString &Working);

    int Minnumber() const;
    void setMinnumber(int& Minnumber);

    int Maxnumber() const;
    void setMaxnumber(int& Maxnumber);

    QString ProNumber() const;
    void setProNumber(const QString &ProNumber);

signals:
    void SendCommand(QString s);
    void SendLog(QString s, int c);
    void SendOver(int m);

private:
    QString m_Product = "TMSAGDHJAKKDH";
    QString m_Working = "VT1";
    int m_Minnumber = 0;
    int m_Maxnumber = 1;
    QString m_ProNumber = "0001";
    QLua* L;
    bool IsLine = false;

public slots:
    void toMessage(bool b);
    void toMessages(QStringList command);
    void SetLineStatus(bool b);
};

#endif // QPRINTTOOLS_H
